home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-04 | 9.4 KB | 235 lines | [TEXT/MPS ] |
- #------------------------------------------------------------------------------
- #
- # Apple Macintosh Developer Technical Support
- #
- # Program: MacShell
- # File: MacShell.make - Make Source
- #
- # Copyright © 1988-1991 Apple Computer, Inc.
- # All rights reserved.
- #
- #------------------------------------------------------------------------------
-
- AppName = 'MacShell'
- Signature = 'CSHL'
-
- #------------------------------------------------------------------------------
- # Location of our utility files. The double “:” means “one level above the
- # current folder”. Hopefully, this will also be the location of our
- # utilities folder. If not, then change the following line:
- #------------------------------------------------------------------------------
-
- UtilityFolder = "::DTS.Utilities:"
- src = :
- obj = :OBJECT:
-
- #------------------------------------------------------------------------------
- # Options for our compilers:
- # -sym on: tells the compilers and linker to emit symbol information for
- # a source level debugger, such as SADE.
- # -i {UtilityFolder}: means to look for any #include files in the specified
- # directory, as well as the normal set.
- # -r: tells the C compiler to require function prototypes.
- # -mbg off: tells the compilers to not emit low-level debugger names. This
- # saves on file space, but you may wish to remove this option if you
- # need to debug with something like Macsbug.
- # -rd: for Rez means to suppress warnings for redeclared types (we redeclare
- # 'RECT' because it’s not included in MPW 3.0).
- # -append: means to add the resources to the target file, rather than
- # deleting all the ones that are there first.
- # -d Signature...: is a way of passing our application's signature to Rez.
- # With this mechanism, we can define our signature here, and export
- # it to Rez, so that we don't have to declare it there, too.
- # -sn STDCLIB=Main: puts all the routines that would normally go into the
- # STDCLIB segment into the Main segment. This is done so that when we
- # call upon any low-level utilities, we don't potentially move memory
- # by loading in a segment.
- #------------------------------------------------------------------------------
-
- SymOptions = #-sym on # turn this on to debug with SADE
- IncludesFolders = -i {UtilityFolder}
-
- COptions = {IncludesFolders} {SymOptions} -r -mbg on
- RezOptions = {IncludesFolders} -rd -append -d Signature="{Signature}" -d AppName={AppName}
- LinkOptions = {SymOptions} {SegmentMappings} -msg nodup
- SegmentMappings = -sn INTENV=Main ∂
- -sn PASLIB=Main ∂
- -sn STDCLIB=Main ∂
- -sn SANELIB=Main ∂
- -sn UtilMain=Main ∂
- -sn MAFailureRes=Main ∂
- -sn Offscreen=Main ∂
- -sn UtilInit=Initialization
-
- #------------------------------------------------------------------------------
- # These are modified default build rules. This is necessary to take into
- # account differences between MPW 3.1 and 3.2
- #------------------------------------------------------------------------------
- {obj} ƒ {src}
-
- {obj}.p.o ƒ {src}.p
- {Pascal} {POptions} {PAltOptions} {DepDir}{Default}.p -o {TargDir}{Default}.p.o
-
- {obj}.c.o ƒ {src}.c
- {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
- #------------------------------------------------------------------------------
- # These are the objects that we want to link with. If any one of these
- # changes, then we invoke the Link command.
- #------------------------------------------------------------------------------
- AppObjects = ∂
- {UtilityFolder}Utilities.c.o ∂
- {obj}start.c.o ∂
- {obj}aeconnect.c.o ∂
- {obj}aecustom.c.o ∂
- {obj}aerequired.c.o ∂
- {obj}aeutils.c.o ∂
- {obj}appletalk.c.o ∂
- {obj}ctlhandler.c.o ∂
- {obj}docursor.c.o ∂
- {obj}doevent.c.o ∂
- {obj}eventloop.c.o ∂
- {obj}file.c.o ∂
- {obj}file2.c.o ∂
- {obj}help.c.o ∂
- {obj}idletasks.c.o ∂
- {obj}init.c.o ∂
- {obj}listcontrol.c.o ∂
- {obj}menu.c.o ∂
- {obj}print.c.o ∂
- {obj}texteditcontrol.a.o ∂
- {obj}texteditcontrol.c.o ∂
- {obj}utils.c.o ∂
- {obj}window.c.o ∂
- {obj}window2.c.o
-
- #------------------------------------------------------------------------------
- # These help define the libraries that we want to link with. {AppObjects} holds
- # the names of the application units we want to link together. {CLibs} holds
- # the libraries we want to link with under MPW 3.0 or MPW 3.1. Under MPW 3.2
- # and later, “CInterface.o” and “CRuntime.o” are merged with “Interface.o” and
- # “Runtime.o”. So, under 3.2 and later, we link with the files in {CLibs32}
- # instead.
- #------------------------------------------------------------------------------
- PLibs = ∂
- "{Libraries}Runtime.o" ∂
- {UtilityFolder}GestaltGlue.a.o ∂
- "{Libraries}Interface.o" ∂
- "{PLibraries}PasLib.o"
-
- PLibs32 = ∂
- "{Libraries}Runtime.o" ∂
- "{Libraries}Interface.o" ∂
- "{PLibraries}PasLib.o"
-
- CLibs = ∂
- "{CLibraries}CRuntime.o" ∂
- "{CLibraries}CInterface.o" ∂
- {UtilityFolder}GestaltGlue.a.o ∂
- # "{CLibraries}StdCLib.o" ∂
- "{Libraries}Interface.o"
-
- CLibs32 = ∂
- "{Libraries}Runtime.o" ∂
- # "{CLibraries}StdCLib.o" ∂
- "{Libraries}Interface.o"
-
- #------------------------------------------------------------------------------
- # Generic Utilities dependencies - This standard set is pasted in whenever
- # we make use of the Utilities routines. It's quite probable that we don't
- # need all of these dependencies for this build, but any extra ones are
- # ignored.
- #------------------------------------------------------------------------------
-
- UtilityRezFiles = {UtilityFolder}Utilities.r ∂
- {UtilityFolder}UtilitiesCommon.h
-
- UtilityHeaderFiles = {UtilityFolder}Utilities.h ∂
- {UtilityFolder}UtilitiesCommon.h
-
- UtilityInterfaceFiles = {UtilityFolder}Utilities.p
-
- {UtilityFolder}Utilities.p.o ƒ {UtilityFolder}Utilities.inc1.p
-
- {UtilityFolder}Utilities.c.o ƒ {UtilityFolder}Utilities.h ∂
- {UtilityFolder}UtilitiesCommon.h
-
- #------------------------------------------------------------------------------
- # Dependencies for the individual components. These will invoke the
- # default build rules listed in Chapter 9 of the MPW 3.0 manual.
- # You may wish to reduce the number of dependencies. Two dependencies
- # you may wish to remove are this makefile and the MacShell.protos file.
- # For the MacShell.protos file, if you add a function to the list of
- # functions in MacShell.protos, you will cause all the source files to be
- # recompiled. This may be more than you want to wait for each time you
- # add a function to your application. On the other hand, if you do not
- # include this in the dependencies, and you change the parameters for a
- # function, and make the respective change to MacShell.protos, any files
- # that reference that function will not be recompiled. If these files are
- # recompiled, the prototype checking will catch any cases where you did
- # not change the way the altered function was called. <<You choose>>
- #------------------------------------------------------------------------------
-
- {AppObjects} ƒ #{AppName}.make ∂
- # MacShell.h ∂
- # MacShell.protos ∂
- MacShellVersion.h ∂
- {UtilityFolder}Utilities.c ∂
- {UtilityHeaderFiles}
-
- #------------------------------------------------------------------------------
- # This is a dummy dependency rule. This will always be executed. This dummy
- # rule must be the first for {AppName} so that it will be executed first.
- # This is necessary to make evaluations that are beyond the scope of
- # Make. These evaluations will be performed by the MacShell at execution time,
- # and they must execute first because compile and link command lines depend
- # on variables set up by these evaluations. This has the unfortunate side
- # effect that Make will always consider {AppName} to be out of date. It will
- # always, at a minimum, execute the commands for the target ShellForce.
- #------------------------------------------------------------------------------
-
- {AppName} ƒƒ ShellForce
-
- # With the above rule, {AppName} will always be out of date with respect to
- # the non-existent file ShellForce. This will force the following commands to
- # be executed.
- ShellForce ƒ
- BEGIN
- IF "{ShellVersion}" == ""
- ( EVALUATE "`Version`" =~ /MPW Shell≈ ([0-9]+(.[ab0-9]+)+)®1≈/ ) ∑ Dev:Null
- SET ShellVersion "{®1}"
- END
- IF "{ShellVersion}" =~ /3.[01]≈/
- SET PAltOptions "-d MPW32=FALSE"
- SET CAltOptions "-d MPW31"
- SET PSysObjects "`QUOTE {PLibs}`"
- SET CSysObjects "`QUOTE {CLibs}`"
- ELSE
- SET PAltOptions "-d MPW32=TRUE"
- SET CAltOptions "-d MPW32"
- SET PSysObjects "`QUOTE {PLibs32}`"
- SET CSysObjects "`QUOTE {CLibs32}`"
- END
- END ∑ Dev:Null # Output to bit bucket so we don’t see above calculations
-
- #------------------------------------------------------------------------------
- # Build rule that links our application together. If any of our objects
- # changes, or this makefile changes, then we relink. The dummy prerequisite
- # ShellForce must come before any other prerequisites for {AppName}
- #------------------------------------------------------------------------------
-
- {AppName} ƒƒ {AppObjects}
- Link {LinkOptions} -o {Targ} {AppObjects} {CSysObjects}
- SetFile {Targ} -t APPL -c {Signature} -a B
-
- #------------------------------------------------------------------------------
- # Build rule that creates our resources and adds them to the application
- #------------------------------------------------------------------------------
-
- {AppName} ƒƒ {AppName}.make ∂
- MacShell.r ∂
- MacShellCommon.h ∂
- MacShellVersion.h ∂
- {UtilityRezFiles}
- Rez {RezOptions} MacShell.r -o {Targ}
-